<!DOCTYPE html>
<html lang="zh">
  <head>
    <meta charset="UTF-8" />

    <!-- <meta
      http-equiv="Content-Security-Policy"
      content="default-src 'none'; style-src 'self' 'unsafe-eval' {{cspSource}}; img-src 'self' https: http: data: {{cspSource}}; script-src 'nonce-{{nonce}}';"
    /> -->
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />

    <link href="{{reset}}" rel="stylesheet" />
    <link href="{{vscode}}" rel="stylesheet" />
    <link href="{{main}}" rel="stylesheet" />

    <title>{{title}}</title>
  </head>
  <body>
    <div class="title-wrap">
      <img src="{{angcyo}}" width="25" title="angcyo" />
      <h1>{{title}}</h1>
    </div>

    <div class="button-wrap">
      <label for="host">url:</label>
      <input id="host" type="text" />

      <label for="content" class="label">内容:</label>
      <input id="content" type="text" class="inputContext" placeholder="内容" />

      <label for="sendSize" class="label">指定大小(KB):</label>
      <input
        id="sendSize"
        type="number"
        class="input"
        placeholder="bytes大小"
      />

      <label for="sendLoopCount" class="label">循环次数:</label>
      <input
        id="sendLoopCount"
        type="number"
        class="input"
        placeholder="次数"
      />
    </div>

    <div class="button-wrap margin">
      <button type="button" id="uuid">随机UUID</button>
      <button type="button" id="base64Encode">Base64加密</button>
      <button type="button" id="base64Decode">Base64解密</button>
      <button type="button" id="clear">清屏</button>
      <span>&nbsp;&nbsp;&nbsp;&nbsp;</span>
      <button type="button" id="connect">连接到WS服务器</button>
      <button type="button" id="disconnect">断开连接</button>
      <button type="button" id="send">发送内容</button>
      <button type="button" id="sendLoop">循环发送内容</button>
      <button type="button" id="sendByte">发送字节</button>
      <button type="button" id="sendByteLoop">循环发送字节</button>
      <button type="button" id="send5">发送5MB</button>
      <button type="button" id="send10">发送10MB</button>
      <button type="button" id="send20">发送20MB</button>
      <button type="button" id="send100">发送100MB</button>
      <span>&nbsp;&nbsp;&nbsp;&nbsp;</span>
      <button type="button" id="base642Png">Base64转Png</button>
      <button type="button" id="base642String">Base64转String</button>
      <button type="button" id="svg2AndroidVector">svg转Android Vector</button>
      <button type="button" id="numberSum">数字求和</button>
      <button type="button" id="distance">求C边</button>
      <button type="button" id="uriEncode">UriEncode</button>
      <button type="button" id="uriDecode">UriDecode</button>
      <button type="button" id="toDateTime">转日期时间</button>
      <button type="button" id="toTimestamp">转时间戳</button>
      <button type="button" id="toHex">转16进制</button>
      <button type="button" id="toDec">转10进制</button>
      <button type="button" id="toOct">转8进制</button>
      <button type="button" id="toBin">转2进制</button>
    </div>

    <div id="content" class="margin">
      <textarea
        id="result"
        name="result"
        placeholder="结果输出..."
        rows="28"
        disabled
      ></textarea>
    </div>

    <label class="padding margin">选择文件↓</label>

    <div class="input-wrap">
      <input id="selectFile" type="file" placeholder="请选择文件..." />

      <label for="width">宽:</label>
      <input id="width" type="number" />
      <label for="height">高:</label>
      <input id="height" type="number" />

      <label id="fileLabel" style="cursor: pointer"></label>
    </div>

    <div class="button-wrap margin">
      <button type="button" id="clearPng">清除图片结果</button>
      <button type="button" id="pdf2png">Pdf转Png</button>
      <button type="button" id="adjustImage">调整图片宽高</button>
      <button type="button" id="png2Base64">Png转Base64</button>
    </div>

    <div id="imageWrap" class="image-wrap"></div>

    <script nonce="{{nonce}}" src="{{spark}}"></script>
    <script nonce="{{nonce}}" src="{{pdf}}"></script>
    <script nonce="{{nonce}}">
      pdfjsLib.GlobalWorkerOptions.workerSrc = "{{pdfWorker}}";
    </script>
    <script nonce="{{nonce}}" src="{{script}}"></script>
  </body>
</html>
